<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>Spaces for Newline Indents in VS | Python4ever</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="It’s really annoying when Visual Studio shows you this:    But github or vim shows you the same file like this:   If you use the “show whitespace” Visual Studio chord (CTRL-R, CTRL-W),you’ll see that">
<meta property="og:type" content="article">
<meta property="og:title" content="Spaces for Newline Indents in VS">
<meta property="og:url" content="https://py4ever.github.io/2015/03/23/2015-03-23-Make-VS-Insert-Spaces/index.html">
<meta property="og:site_name" content="Python4ever">
<meta property="og:description" content="It’s really annoying when Visual Studio shows you this:    But github or vim shows you the same file like this:   If you use the “show whitespace” Visual Studio chord (CTRL-R, CTRL-W),you’ll see that">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="http://ptsteadman.github.io/images/vs1.png">
<meta property="og:image" content="http://ptsteadman.github.io/images/vim1.png">
<meta property="og:image" content="http://ptsteadman.github.io/images/ws.png">
<meta property="og:image" content="http://ptsteadman.github.io/images/spaces.png">
<meta property="og:image" content="http://ptsteadman.github.io/images/ws2.png">
<meta property="article:published_time" content="2015-03-23T00:00:00.000Z">
<meta property="article:modified_time" content="2021-09-26T16:57:46.963Z">
<meta property="article:author" content="雷学委&#x2F;&#x2F;">
<meta property="article:tag" content="C#">
<meta property="article:tag" content="Visual Studio">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://ptsteadman.github.io/images/vs1.png">
  
    <link rel="alternate" href="/atom.xml" title="Python4ever" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">

  
<meta name="generator" content="Hexo 5.4.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Python4ever</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">py4ever</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://py4ever.github.io"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-2015-03-23-Make-VS-Insert-Spaces" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2015/03/23/2015-03-23-Make-VS-Insert-Spaces/" class="article-date">
  <time class="dt-published" datetime="2015-03-23T00:00:00.000Z" itemprop="datePublished">2015-03-23</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/NET/">.NET</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      Spaces for Newline Indents in VS
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <p>It’s really annoying when Visual Studio shows you this:</p>
<img src="http://ptsteadman.github.io/images/vs1.png" class="">


<p>But github or vim shows you the same file like this:</p>
<img src="http://ptsteadman.github.io/images/vim1.png" class="">

<p>If you use the “show whitespace” Visual Studio chord <code>(CTRL-R, CTRL-W)</code>,<br>you’ll see that visual studio inserts tabs instead of spaces by<br>default for newline indent:</p>
<img src="http://ptsteadman.github.io/images/ws.png" class="">

<p>Visual Studio displays tabs as having the same<br>width as four spaces.  But if you’re collaborating with someone working<br>in another text editor like vim, your automatically-inserted tabs will<br>appear larger than four spaces.</p>
<p>Here’s how to make visual studio insert spaces instead of tabs on newline indents:<br>go to <code>Tools-&gt;Options-&gt;Text Editor-&gt;All Languages-&gt;Tabs</code>:</p>
<img src="http://ptsteadman.github.io/images/spaces.png" class="">

<p>That’s better:</p>
<img src="http://ptsteadman.github.io/images/ws2.png" class="">

      
    </div>
    <footer class="article-footer">
      <a data-url="https://py4ever.github.io/2015/03/23/2015-03-23-Make-VS-Insert-Spaces/" data-id="cku1gtkim00039hnk5a33e61i" data-title="Spaces for Newline Indents in VS" class="article-share-link">Share</a>
      
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/C/" rel="tag">C#</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Visual-Studio/" rel="tag">Visual Studio</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2015/04/01/2015-04-01-NGINX-Static-Locations/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Static NGINX Locations
        
      </div>
    </a>
  
  
    <a href="/2014/02/23/2014-02-23-hello-world/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Welcome To Hexo</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/NET/">.NET</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Dynamics-NAV/">Dynamics NAV</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Hexo/">Hexo</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Humor/">Humor</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/NGINX/">NGINX</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/" rel="tag">C#</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Design/" rel="tag">Design</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/How-To/" rel="tag">How-To</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/NAV/" rel="tag">NAV</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Programming/" rel="tag">Programming</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Resources/" rel="tag">Resources</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Visual-Studio/" rel="tag">Visual Studio</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Web-Development/" rel="tag">Web Development</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Welcome/" rel="tag">Welcome</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/employment/" rel="tag">employment</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/funny/" rel="tag">funny</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/C/" style="font-size: 10px;">C#</a> <a href="/tags/Design/" style="font-size: 10px;">Design</a> <a href="/tags/How-To/" style="font-size: 10px;">How-To</a> <a href="/tags/NAV/" style="font-size: 20px;">NAV</a> <a href="/tags/Programming/" style="font-size: 10px;">Programming</a> <a href="/tags/Resources/" style="font-size: 20px;">Resources</a> <a href="/tags/Visual-Studio/" style="font-size: 10px;">Visual Studio</a> <a href="/tags/Web-Development/" style="font-size: 10px;">Web Development</a> <a href="/tags/Welcome/" style="font-size: 10px;">Welcome</a> <a href="/tags/employment/" style="font-size: 10px;">employment</a> <a href="/tags/funny/" style="font-size: 10px;">funny</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/09/">September 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/05/">May 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/04/">April 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/03/">March 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/02/">February 2014</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2021/09/27/py4ever%E4%B8%BB%E7%AB%99%E6%AD%A3%E5%BC%8F%E5%8F%91%E5%B8%83/">py4ever主站正式发布!</a>
          </li>
        
          <li>
            <a href="/2021/09/26/hello-world/">Hello World</a>
          </li>
        
          <li>
            <a href="/2016/01/02/2016-01-02-Notes-On-Creating-A-Hexo-Theme/">Notes On Creating A Hexo Theme</a>
          </li>
        
          <li>
            <a href="/2015/05/02/2015-05-02-How-To-Impress/">How To Impress Employers at Infosessions</a>
          </li>
        
          <li>
            <a href="/2015/04/08/2015-04-08-NAV-Programming-Resources/">NAV Web Service Programming Resources</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2021 雷学委//<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/js/jquery-3.4.1.min.js"></script>



  
<script src="/fancybox/jquery.fancybox.min.js"></script>




<script src="/js/script.js"></script>





  </div>
</body>
</html>